package cc.jq1024.infrastructure.persistent.dao;

import cc.jq1024.infrastructure.persistent.po.UserBehaviorRebateOrderPO;
import cc.jq1024.router.annotation.DBRouter;
import cc.jq1024.router.annotation.DBRouterStrategy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 用户行为返利流水订单表 Mapper 接口
 * </p>
 *
 * @author lijiaqiang@ljq1024.cc
 * @since 2024-06-29
 */
@Mapper
@DBRouterStrategy(splitTable = true) // 分库又分表
public interface IUserBehaviorRebateOrderDao extends BaseMapper<UserBehaviorRebateOrderPO> {

    /** 插入用户行为返利流水订单表 */
    void insertOne(UserBehaviorRebateOrderPO userBehaviorRebateOrderPO);

    /** 根据外部单号查询订单 */
    @DBRouter
    List<UserBehaviorRebateOrderPO> queryOrderByOutBusinessNo(UserBehaviorRebateOrderPO userBehaviorRebateOrderPO);
}
